//
//  LXHomeButton.m
//  LvXiShopping
//
//  Created by 诸葛孔明 on 16/5/27.
//  Copyright © 2016年 SJT. All rights reserved.
//

#import "LXHomeButton.h"

@implementation LXHomeButton

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.titleLabel.font = [UIFont systemFontOfSize:11];
        [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        self.adjustsImageWhenHighlighted = NO;
//        self.titleLabel.backgroundColor = [UIColor redColor];
//        self.imageView.backgroundColor = [UIColor yellowColor];
    }
    return self;
}

- (void)awakeFromNib
{
    [super awakeFromNib];
//    self.titleLabel.font            = [UIFont systemFontOfSize:14];
//    self.titleLabel.textAlignment   = NSTextAlignmentCenter;
//    [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];

}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.imageView.x   = 0;
    self.imageView.y         = self.height * 0.1 ;
    self.imageView.width     = self.width;
    self.imageView.height    = self.width;
    
    self.titleLabel.x        = 0;
    self.titleLabel.y        = self.imageView.botton ;
    self.titleLabel.width    = self.width;
    self.titleLabel.height   = self.height - self.titleLabel.y;
    
}


@end
